home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / GameKit / Headers / gamekit / GKActorManager.h < prev    next >
Text File  |  1995-06-12  |  874b  |  25 lines

  1.  
  2. #import <gamekit/gamekit.h>
  3.  
  4. // An actor is dumped here when it "dies", rather than being freed.
  5. // Then, when we need a new actor of the same class, we just grab
  6. // it from here, re-init it, and put it to work.  If there aren't
  7. // any "dead" actors of the class we need, then we create one.
  8.  
  9. // Note that this object can take any Class and cache unused copies,
  10. // it isn't limited to GameActors.  (Should I call it an ObjectManager
  11. // and put it in the DAYMiscKit?  Might be useful...)
  12.  
  13. @interface GKActorManager:Object
  14. {
  15.     id actorHash;    // Filled with Lists, one List per actor class
  16. }
  17.  
  18. - init;
  19. - listOfActorsOfClass:aClass;    // returns List of dead actors of class aClass
  20. - addDeadActor:anActor;        // adds a dead actor to the list
  21. - getActorOfClass:aClass;    // returns a dead actor, removing it from the list
  22. - getActorOfClassNamed:(char *)className;    // same as above
  23.  
  24. @end
  25.